package com.yanqu.road.entity.log;

import com.yanqu.road.entity.FieldTypeAnnotation;

import java.sql.Types;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@FieldTypeAnnotation(tableName = "t_l_ck_music_room_get_reward", desc = "妙音坊领取建筑累计奖励日志", autoSave = true, uploadCk = true)
public class LogMusicRoomGetAmountReward extends ServerBaseLog {
    @FieldTypeAnnotation(desc = "玩家ID", isIndex = true)
    private long userId;
    @FieldTypeAnnotation(desc = "上一次领取结算时间")
    private long lastRewardTime;
    @FieldTypeAnnotation(desc = "这一次领取结算时间")
    private long thisRewardTime;
    @FieldTypeAnnotation(desc = "经过了多少时辰")
    private int passAmount;
    @FieldTypeAnnotation(desc = "奖励", sqlType = Types.LONGNVARCHAR)
    private String reward;
    @FieldTypeAnnotation(desc = "美女行程记录,key建筑id,value美女入住次数", saveJson = true)
    private Map<Integer, String> beautySettle = new HashMap<>();
    @FieldTypeAnnotation(desc = "时间")
    private Date logTime;

    public LogMusicRoomGetAmountReward(long userId, long lastRewardTime, long thisRewardTime, int passAmount, String reward) {
        this.userId = userId;
        this.lastRewardTime = lastRewardTime;
        this.thisRewardTime = thisRewardTime;
        this.passAmount = passAmount;
        this.reward = reward;
        this.logTime = new Date();
    }

    @Override
    public long getUserId() {
        return userId;
    }
}
